import time
from pickletools import long1
from time import sleep

from Tools.scripts.cleanfuture import dryrun
from selenium.webdriver.common.by import By

from common.com import forum, Driver


#我的帖子界面测试
class mypega:
    driver = ""
    def __init__(self):
        self.driver = forum.driver
    def mCheck(self):
        #进入我的帖子页面
        self.driver.find_element(By.CSS_SELECTOR,"body > div.page > header.navbar.navbar-expand-md.navbar-light.d-print-none > div > div > div.nav-item.dropdown > a").click()
        time.sleep(2)
        self.driver.find_element(By.CSS_SELECTOR,"#index_user_profile").click()

        #进行元素查找
        time.sleep(1)
        #昵称
        self.driver.find_element(By.CSS_SELECTOR, "#profile_nickname")
        #发帖数
        time.sleep(1)
        self.driver.find_element(By.CSS_SELECTOR, "#bit-forum-content > div.page-header.d-print-none > div > div > div.col > div > div:nth-child(1)")
        #注册时间
        time.sleep(1)
        self.driver.find_element(By.CSS_SELECTOR, "#profile_createTime")
        #帖子列表
        time.sleep(1)
        self.driver.find_element(By.CSS_SELECTOR, "#profile_article_body > li:nth-child(1) > div.timeline-event-icon.bg-twitter-lt")
        # 个人介绍
        time.sleep(1)
        self.driver.find_element(By.CSS_SELECTOR, "#bit-forum-content > div.page-body > div > div > div.col-lg-4 > div > div > div > div")

        time.sleep(2)

mypega = mypega()
mypega.mCheck()